﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AdapterPattern
{
    internal class ProgramAdapter
    {
        private static void Main(string[] args)
        {
            EnemyTank rx7Tank = new EnemyTank();

            EnemyRobot fredTheRobot = new EnemyRobot();

            EnemyAttacker robotAdapter = new EnemyRobotAdapter(fredTheRobot);

            Console.WriteLine("The Robot");

            fredTheRobot.reactToHuman("Paul");
            fredTheRobot.walkForward();
            fredTheRobot.smashWithHands();
            Console.WriteLine();

            Console.WriteLine("The Enemy Tank");

            rx7Tank.assignDriver("Frank");
            rx7Tank.driveForward();
            rx7Tank.fireWeapon();
            Console.WriteLine();

            Console.WriteLine("The Robot with Adapter");

            robotAdapter.assignDriver("Mark");
            robotAdapter.driveForward();
            robotAdapter.fireWeapon();
        }
    }
}